﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCCommon.OAEnums;

namespace BCDto.OA.WorkflowTemplate.WorkflowTemplatePermission
{
	/// <summary>
	/// 工作流模板权限
	/// </summary>
	public class WorkflowTemplatePermissionRequestDto
	{
		/// <summary>
		/// 工作流模板Code
		/// </summary>		
		[Display(Name = "工作流模板Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string TemplateCode { get; set; }
		/// <summary>
		/// 工作流模板名称
		/// </summary>		
		[Display(Name = "工作流模板名称")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string TemplateName { get; set; }
		/// <summary>
		/// 权限映射Id
		/// </summary>		
		[Display(Name = "权限映射Id")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public long PermissionReferenceId { get; set; }
		/// <summary>
		/// 权限映射名称
		/// </summary>		
		[Display(Name = "权限映射名称")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string PermissionReferenceName { get; set; }
		/// <summary>
		/// 权限类型(公司，部门，人员，岗位，其他，节点执行人)
		/// </summary>		
		[Display(Name = "权限类型(公司，部门，人员，岗位，其他，节点执行人)")]
		[StringLength(10, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string PermissionTypeStr { get; set; }
		/// <summary>
		/// 权限类型
		/// </summary>		
		[Display(Name = "权限类型")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public OAWorkflowPermissionType PermissionType { get; set; }
		/// <summary>
		/// 复选框选中Key
		/// </summary>		
		[Display(Name = "复选框选中Key")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string TreeCheckedKey { get; set; }
	}
}

